package com.jyw.fragment;

import android.app.Fragment;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

/**
 * @author simonw
 * @version 1.0
 * @created 2017/1/1
 */

public class BaseFragment extends Fragment {
    private SharedPreferences mSharedPrfs;

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        mSharedPrfs = getActivity().getApplication().getSharedPreferences("jyw", Context.MODE_PRIVATE);
        super.onViewCreated(view, savedInstanceState);
    }

    protected SharedPreferences getPrefs() {
        return mSharedPrfs;
    }
}
